<?php
$this->breadcrumbs=array(
        'Фотографии'=>array('index'),
        FotoC::model()->getName($model->id_foto_cat)=>array('category','c'=>$model->id_foto_cat),
        $model->name,
);


?>

<div class="nofon" id="foto">
<div id="fcount">

    <?php
    
    $next = Foto::nextImage($model->id_foto,$model->id_foto_cat);
    $back = Foto::backImage($model->id_foto,$model->id_foto_cat);
    echo Foto::countes($model->id_foto , $model->id_foto_cat);

    ?>
</div>
<div id="foto" >

    <div id="of">

        <a href="<?php echo $url=$this->createUrl("foto/view", array('id'=>$next));?>">
            <img alt="<?php echo $model->name?>" src="<?php echo Yii::app()->request->baseUrl?>/media/foto/<?php echo $model->link?>">
        </a>

    </div>
    <div id="fotdesc">

        <div id="fdesc"><?php echo $model->description?></div>
        <div id="fau">Выложил: <?php echo $model->autor?>
         (<?php echo $model->c_date?>)</div>

    </div>
    <div id="fot">
        <?php
        echo '<span id="b"><a href="'.$url=$this->createUrl("foto/view", array('id'=>$back)).'"><< Прошлoe фото</a></span>';

        echo '<span id="n"><a href="'.$url=$this->createUrl("foto/view", array('id'=>$next)).'">Следуещее фото >></a></span>';
        ?>
    </div>

</div>
</div>
<div class="nofon">
<?php
if(Config::model()->find('conf_name=:name', array(':name'=>'coment'))->conf_value == 'on') {
    echo '<hr>
        <h2>Коментарии</h2>';
    $this->widget('zii.widgets.CListView', array(
            'dataProvider'=>$dataProvider,
            'itemView'=>'application.modules.Coment.views.coments._coments',
    ));
    if(!Yii::app()->user->isGuest)
        echo $this->renderPartial('application.modules.Coment.views.coments._form', array('model'=>$coment_model));
    else echo '<h3>Оставлять коментарий могут только зарегистрированные пользователи</h3>';
}
?>
</div>
